home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 398 / 398.xpi / defaults / parser.js < prev    next >
Text File  |  2010-02-04  |  12KB  |  146 lines

  1. ({
  2.   targets: {
  3.     "global-0": {name: "global", index: 0, group: "local", path: "./adc:local"},
  4.     "swa-0": {name: "swa", index: 0, group: "swa", path: "./adc:watchwarnareas"},
  5.     "radar-0": {name: "radar", index: 0, group: "radar", path: "."},
  6.     "current-0": {name: "current", index: 0, group: "current", path: "./adc:currentconditions"},
  7.     "days-0": {name: "days", index: 0, group: "forecast", path: "./adc:forecast/adc:day[@number='1']/adc:daytime"},
  8.     "days-1": {name: "days", index: 1, group: "forecast", path: "./adc:forecast/adc:day[@number='2']/adc:daytime"},
  9.     "days-2": {name: "days", index: 2, group: "forecast", path: "./adc:forecast/adc:day[@number='3']/adc:daytime"},
  10.     "days-3": {name: "days", index: 3, group: "forecast", path: "./adc:forecast/adc:day[@number='4']/adc:daytime"},  
  11.     "days-4": {name: "days", index: 4, group: "forecast", path: "./adc:forecast/adc:day[@number='5']/adc:daytime"},
  12.     "days-5": {name: "days", index: 5, group: "forecast", path: "./adc:forecast/adc:day[@number='6']/adc:daytime"},
  13.     "days-6": {name: "days", index: 6, group: "forecast", path: "./adc:forecast/adc:day[@number='7']/adc:daytime"},
  14.     "days-7": {name: "days", index: 7, group: "forecast", path: "./adc:forecast/adc:day[@number='8']/adc:daytime"},
  15.     "days-8": {name: "days", index: 8, group: "forecast", path: "./adc:forecast/adc:day[@number='9']/adc:daytime"}, 
  16.     "nights-0": {name: "nights", index: 0, group: "forecast", path: "./adc:forecast/adc:day[@number='1']/adc:nighttime"},
  17.     "nights-1": {name: "nights", index: 1, group: "forecast", path: "./adc:forecast/adc:day[@number='2']/adc:nighttime"},
  18.     "nights-2": {name: "nights", index: 2, group: "forecast", path: "./adc:forecast/adc:day[@number='3']/adc:nighttime"},
  19.     "nights-3": {name: "nights", index: 3, group: "forecast", path: "./adc:forecast/adc:day[@number='4']/adc:nighttime"},  
  20.     "nights-4": {name: "nights", index: 4, group: "forecast", path: "./adc:forecast/adc:day[@number='5']/adc:nighttime"},
  21.     "nights-5": {name: "nights", index: 5, group: "forecast", path: "./adc:forecast/adc:day[@number='6']/adc:nighttime"},
  22.     "nights-6": {name: "nights", index: 6, group: "forecast", path: "./adc:forecast/adc:day[@number='7']/adc:nighttime"},
  23.     "nights-7": {name: "nights", index: 7, group: "forecast", path: "./adc:forecast/adc:day[@number='8']/adc:nighttime"},
  24.     "nights-8": {name: "nights", index: 8, group: "forecast", path: "./adc:forecast/adc:day[@number='9']/adc:nighttime"},
  25.     "ad-0": {name: "ad", index: 0, group: "ad", path: "./adc:admod"},
  26.     "logo-0": {name: "logo", index: 0, group: "logo", path: "./adc:logo"}    
  27.   },
  28.  
  29.   groups: {
  30.     local: { 
  31.       nl: {name: "nl", type: "Char", calc: "'/n'"},
  32.       prof: {name: "prof", type: "Char", calc: "comp._prfSvc.current.name;"},
  33.       ufdb: {name: "ufdb", type: "Char", path: "./adc:ufdb"},
  34.       city: {name: "city", type: "Char", path: "./adc:city"},
  35.       state: {name: "state", type: "Char", path: "./adc:state"},
  36.       dnam: {name: "dnam", type: "Char", calc: "comp.getValue(aTarget, aIndex, 'city', aConverter) + ', ' + comp.getValue(aTarget, aIndex, 'state', aConverter);"},
  37.       lat: {name: "lat", type: "Int", path: "./adc:lat", conversion: "degrees"},
  38.       lon: {name: "lon", type: "Int", path: "./adc:lon", conversion: "degrees"},
  39.       tm: {name: "tm", type: "Char", path: "./adc:time"},
  40.       dls: {name: "dls", type: "Bool", path: "./adc:gmtdiff/@daylightsavings"},
  41.       gmt: {name: "gmt", type: "Char", path: "./adc:gmtdiff"}    
  42.     },
  43.     swa: {
  44.       icon: {name: "icon", type: "Char", calc: "'swa'", hidden: "true"},
  45.       zone: {name: "zone", type: "Char", path: "@zone"},
  46.       county: {name: "county", type: "Char", path: "@county"},
  47.       active: {name: "active", type: "Bool", path: "@isactive"},
  48.       url: {name: "url", type: "Char", path: "./adc:url", hidden: "true"}
  49.     },
  50.     radar: {
  51.       icon: {name: "icon", type: "Char", calc: "'radar'", hidden: "true"},
  52.       image: {name: "image", type: "Char", path: "./adc:images/adc:radar", hidden: "true"},
  53.       imagelarge: {name: "imagelarge", type: "Char", path: "./adc:images/adc:radarlarge", hidden: "true"},
  54.       url: {name: "url", type: "Char", path: "./adc:currentconditions/adc:radurl", hidden: "true"}
  55.     },
  56.     current: {
  57.       url: {name: "url", type: "Char", path: "./adc:url", hidden: "true"},
  58.       barr: {name: "barr", type: "Int", path: "./adc:pressure", conversion: "pressure"},
  59.       bardcode: {name: "bardcode", type: "Char", path: "./adc:pressure/@state", hidden: "true" },
  60.       bard: {name: "bard", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  61.       tmp: {name: "tmp", type: "Int", path: "./adc:temperature", conversion: "temp"},
  62.       flik: {name: "flik", type: "Int", path: "./adc:realfeel", conversion: "temp"},
  63.       hmid: {name: "hmid", type: "Char", path: "./adc:humidity"},
  64.       sunr: {name: "sunr", type: "Char", path: "/adc:adc_database/adc:planets/adc:sun/@rise"},
  65.       suns: {name: "suns", type: "Char", path: "/adc:adc_database/adc:planets/adc:sun/@set"},
  66.       t_en: {name: "t_en", type: "Char", path: "./adc:weathertext", hidden: "true"},
  67.       t: {name: "t", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  68.       icon: {name: "icon", type: "Char", path: "./adc:weathericon", hidden: "true"},
  69.       windgust: {name: "windgust", type: "Int", path: "./adc:windgusts", conversion: "speed"},
  70.       winds: {name: "winds", type: "Int", path: "./adc:windspeed", conversion: "speed"},
  71.       windt: {name: "windt", type: "Char", path: "./adc:winddirection"},
  72.       vis: {name: "vis", type: "Int", path: "./adc:visibility", conversion: "dist"},
  73.       precip: {name: "precip", type: "Int", path: "./adc:precip", conversion: "precip"},
  74.       uvi: {name: "uvi", type: "Int", path: "./adc:uvindex/@index"},
  75.       uvt: {name: "uvt", type: "Char", path: "./adc:uvindex"},
  76.       moon: {name: "moon", type: "Char", path: "/adc:adc_database/adc:moon/adc:phase[position()=1]"},   
  77.       moontcode: {name: "moontcode", type: "Char", path: "/adc:adc_database/adc:moon/adc:phase[position()=1]/@text", hidden: "true"},         
  78.       moont: {name: "moont", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  79.       moond: {name: "moond", type: "Char", path: "/adc:adc_database/adc:moon/adc:phase[position()=1]/@date"}, 
  80.       moonr: {name: "moonr", type: "Char", path: "/adc:adc_database/adc:planets/adc:moon/@rise"},
  81.       moons: {name: "moons", type: "Char", path: "/adc:adc_database/adc:planets/adc:moon/@set"},
  82.       tree: {name: "tree", type: "Char", path: "/adc:adc_database/adc:airandpollen/adc:tree"},
  83.       weed: {name: "weed", type: "Char", path: "/adc:adc_database/adc:airandpollen/adc:weed"},
  84.       grass: {name: "grass", type: "Char", path: "/adc:adc_database/adc:airandpollen/adc:grass"},
  85.       mold: {name: "mold", type: "Char", path: "/adc:adc_database/adc:airandpollen/adc:mold"},
  86.       airq: {name: "airq", type: "Char", path: "/adc:adc_database/adc:airandpollen/adc:airquality"},
  87.       airt: {name: "airt", type: "Int", path: "/adc:adc_database/adc:airandpollen/adc:airqualitytype"}
  88.     },
  89.     forecast: {
  90.       tmp: {name: "tmp", alias: "tmp2", type: "Int", calc: "(aTarget == 'days') ? comp.getValue(aTarget, aIndex, 'hi', aConverter) : comp.getValue(aTarget, aIndex, 'low', aConverter);", conversion: "temp"},
  91.       flik: {name: "flik", alias: "flik2", type: "Int", calc: "(aTarget == 'days') ? comp.getValue(aTarget, aIndex, 'rlfeelhi', aConverter) : comp.getValue(aTarget, aIndex, 'rlfeellow', aConverter);", conversion: "temp"},
  92.       part: {name: "part", type: "Char", calc: "(aTarget == 'days') ? comp.bundle.GetStringFromName('ff.parser.part.daytime') : comp.bundle.GetStringFromName('ff.parser.part.nighttime');"},
  93.       partn: {name: "partn", type: "Char", calc: "(aTarget == 'days') ? '' : comp.bundle.GetStringFromName('ff.parser.part.nighttime') + ' ';"},
  94.       url: {name: "url", type: "Char", path: "ancestor::adc:day/adc:url", hidden: "true"},
  95.       url5day: {name: "url5day", type: "Char", path: "ancestor::adc:forecast/adc:url5day", hidden: "true"},
  96.       hbh: {name: "hbh", type: "Char", path: "ancestor::adc:forecast/adc:hbh", hidden: "true"},      
  97.       numb: {name: "numb", type: "Int", path: "ancestor::adc:day/@number"},
  98.       obsd: {name: "obsd", type: "Char", path: "ancestor::adc:day/adc:obsdate"},
  99.       daycode: {name: "daycode", type: "Char", path: "ancestor::adc:day/adc:daycode", hidden: "true"},
  100.       day: {name: "day", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);" },
  101.       sdaycode: {name: "sdaycode", type: "Char", path: "ancestor::adc:day/adc:daycode", hidden: "true"},
  102.       sday: {name: "sday", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  103.       sunr: {name: "sunr", type: "Char", path: "ancestor::adc:day/adc:sunrise"},
  104.       suns: {name: "suns", type: "Char", path: "ancestor::adc:day/adc:sunset"},
  105.       t_en: {name: "t_en", type: "Char", path: "./adc:txtshort", hidden: "true"},
  106.       tlong_en: {name: "tlong_en", type: "Char", path: "./adc:txtlong", hidden: "true"},
  107.       t: {name: "t", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  108.       tlong: {name: "tlong", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  109.       icon: {name: "icon", type: "Char", path: "./adc:weathericon", hidden: "true"},
  110.       hi: {name: "hi", type: "Int", path: "./adc:hightemperature", conversion: "temp"},
  111.       low: {name: "low", type: "Int", path: "./adc:lowtemperature", conversion: "temp"},
  112.       rlfeelhi: {name: "rlfeelhi", type: "Int", path: "./adc:realfeelhigh", conversion: "temp"},
  113.       rlfeellow: {name: "rlfeellow", type: "Int", path: "./adc:realfeellow", conversion: "temp"},
  114.       windgust: {name: "windgust", type: "Int", path: "./adc:windgust", conversion: "speed"},
  115.       winds: {name: "winds", type: "Int", path: "./adc:windspeed", conversion: "speed"},
  116.       windt: {name: "windt", type: "Char", path: "./adc:winddirection"},
  117.       maxuv: {name: "maxuv", type: "Int", path: "./adc:maxuv"},
  118.       rainamnt: {name: "rainamnt", type: "Int", path: "./adc:rainamount", conversion: "precip"},
  119.       snowamnt: {name: "snowamnt", type: "Int", path: "./adc:snowamount", conversion: "precip"},
  120.       precip: {name: "precip", type: "Int", path: "./adc:precipamount", conversion: "precip"},
  121.       tstorm: {name: "tstorm", type: "Int", path: "./adc:tstormprob", conversion: "percent"},
  122.       moon: {name: "moon", type: "Char", prepath: "ancestor::adc:day/@number", path: "/adc:adc_database/adc:moon/adc:phase[position()=number($PRE)]"},   
  123.       moontcode: {name: "moontcode", type: "Char", prepath: "ancestor::adc:day/@number", path: "/adc:adc_database/adc:moon/adc:phase[position()=number($PRE)]/@text", hidden: "true"},
  124.       moont: {name: "moont", type: "Char", calc: "comp._translate(aTarget, aIndex, aName, aConverter);"},
  125.       moond: {name: "moond", type: "Char", prepath: "ancestor::adc:day/@number", path: "/adc:adc_database/adc:moon/adc:phase[position()=number($PRE)]/@date"}         
  126.     },
  127.     ad: {
  128.       url: {name: "url", type: "Char", path: "./adc:url", hidden: "true" },
  129.       imagepath: {name: "imagepath", type: "Char", path: "./adc:img", hidden: "true" },
  130.       imageheight: {name: "imageheight", type: "Int", path: "./adc:img/@h", hidden: "true" },
  131.       imagewidth: {name: "imagewidth", type: "Int", path: "./adc:img/@w", hidden: "true" },
  132.       track: {name: "track", type: "Char", path: "./adc:pix", hidden: "true" }
  133.     },
  134.     logo: {
  135.         url: {name: "url", type: "Char", path: "./adc:url", hidden: "true" },
  136.         imagepath: {name: "imagepath", type: "Char", path: "./adc:img", hidden: "true" },
  137.         imageheight: {name: "imageheight", type: "Int", path: "./adc:img/@h", hidden: "true" },
  138.         imagewidth: {name: "imagewidth", type: "Int", path: "./adc:img/@w", hidden: "true" },
  139.         track: {name: "track", type: "Char", path: "./adc:pix", hidden: "true" },
  140.         tooltippath: {name: "tooltippath", type: "Char", path: "./adc:tooltip", hidden: "true" },
  141.         tooltipheight: {name: "tooltipheight", type: "Int", path: "./adc:tooltip/@h", hidden: "true" },
  142.         tooltipwidth: {name: "tooltipwidth", type: "Int", path: "./adc:tooltip/@w", hidden: "true" },
  143.         tooltiptrack: {name: "tooltiptrack", type: "Char", path: "./adc:tooltipPix", hidden: "true" }        
  144.       }    
  145.   }
  146. });